"""
All of the constants in the simulation.
"""

import sys

# To make pickling a bit easier
sys.setrecursionlimit( 50000 )

# Global constants

NUM_NEURONS = 20
SPHERE_RADIUS = 0.2 # millimeters
EXC_PROB = 0.80 # Probability that a given neuron is excitatory
BIG_DISTANCE_THRESHOLD = 1.5 / SPHERE_RADIUS # first approximation of distance (big threshold)
SHORT_DISTANCE_THRESHOLD = 0.5 / SPHERE_RADIUS # first approximation of distance (small threshold)
EXC_NEIGHBORHOOD = 1.5 # mm; Radius of excitatory neighborhood
INH_NEIGHBORHOOD = 0.5 # mm; Radius of inhibitory neighborhood
HIGH_SPEED = 1.0 # mm/ms
LOW_SPEED = 0.15 # mm/ms
EXC_CONNECT_PROB = 1.0 # Probability that an excitatory neuron connects with a neighbor
INH_CONNECT_PROB = 1.0 # Probability that an inhibitory neuron connects with a neighbor
DELTA_T = 0.5 # milliseconds
INIT_WEIGHT = 0.1 # initial weighting between any two neurons
A_PLUS = 0.004 # STDP Update variables; A_PLUS for facilitation
TAU_PLUS = 15.0 # ms; time-decay in STDP update
A_MINUS =  0.004 # A_MINUS for depression
TAU_MINUS = 20.0 # ms
LEARNING = 10.0**(-6.0) # Universal learning time constant
NOISE_MID = -20.0 # amps; Average noisy current
NOISE_AMP = 5.0 # amps; Amplitude of noise
PLOT_TIME = 1000 # ms; Number of milliseconds plotted
MAX_TIME = 1000 # ms; Number of milliseconds simulated
V_MAX = 30.0 # voltage reset value signifying a spike
